package com.data.basic.chapter07;
import com.data.basic.chapter06.BST01;



/** 基于二分搜索树的set集合---->简单
 * Created by wangbing on 2018/5/13.
 */
public class BSTSet<E extends Comparable<E>> implements MySet<E> {

    private BST01<E> bst;

    public BSTSet() {
        bst = new BST01<E>();
    }

    public void add(E e) {
        bst.add(e);

    }

    public void remove(E e) {
        bst.remove(e);

    }

    public boolean contains(E e) {
        return bst.contains(e);
    }

    public int getSize() {
        return bst.getSize();
    }

    public boolean isEmpty() {
        return bst.isEmpty();
    }
}
